﻿namespace Tetris.Game.Common.TetrisCenter
{
    public enum RotationAngle
    {
        Degrees0 = 0,
        Degrees90 = 90,
        Degrees180 = 180,
        Degrees270 = 270
    }
    public static class RotationAngleEx
    {
        /// <summary>
        /// 获取角度
        /// </summary>
        /// <param name="angle"></param>
        /// <returns></returns>
        public static int GetAngleDegrees(this RotationAngle angle)
        {
            return (int)angle;
        }
        /// <summary>
        /// 获取弧度
        /// </summary>
        /// <param name="angle"></param>
        /// <returns></returns>
        public static double GetRadianDegrees(this RotationAngle angle)
        {
            return angle.GetAngleDegrees() / (double)180 * Math.PI;
        }
    }
}
